package tech.summerly.weather.data.remote

import kotlinx.coroutines.experimental.runBlocking
import org.junit.Test

/**
 * Created by summer on 18-3-7
 */
class CaiYunApiTest {

    private val location = "121.6544,25.1552"

    @Test
    fun forecast() = runBlocking {
        val forecast = CaiYunService.service.getForecast(location)
        val response = forecast.await()
        val daily = response.result.daily
        println(daily)
        println(response)
    }


    @Test
    fun realtime() = runBlocking {
        val realtime = CaiYunService.service.getRealTime(location)
        val response = realtime.await()
        println(response)
    }
}